3.1.4 \(\int \frac {\cos (x)}{a+a \csc (x)} \, dx\) [4]

Optimal. Leaf size=17 \[ -\frac {\log (1+\sin (x))}{a}+\frac {\sin (x)}{a} \]

[Out]

-ln(1+sin(x))/a+sin(x)/a

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3957, 2912, 12, 45} \begin {gather*} \frac {\sin (x)}{a}-\frac {\log (\sin (x)+1)}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[x]/(a + a*Csc[x]),x]

[Out]

-(Log[1 + Sin[x]]/a) + Sin[x]/a

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {\cos (x)}{a+a \csc (x)} \, dx &=\int \frac {\cos (x) \sin (x)}{a+a \sin (x)} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x}{a (a+x)} \, dx,x,a \sin (x)\right )}{a}\\ &=\frac {\text {Subst}\left (\int \frac {x}{a+x} \, dx,x,a \sin (x)\right )}{a^2}\\ &=\frac {\text {Subst}\left (\int \left (1-\frac {a}{a+x}\right ) \, dx,x,a \sin (x)\right )}{a^2}\\ &=-\frac {\log (1+\sin (x))}{a}+\frac {\sin (x)}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 17, normalized size = 1.00 \begin {gather*} -\frac {\log (1+\sin (x))}{a}+\frac {\sin (x)}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/(a + a*Csc[x]),x]

[Out]

-(Log[1 + Sin[x]]/a) + Sin[x]/a

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 23, normalized size = 1.35

method result size
derivativedivides \(-\frac {\ln \left (1+\csc \left (x \right )\right )-\frac {1}{\csc \left (x \right )}-\ln \left (\csc \left (x \right )\right )}{a}\) \(23\)
default \(-\frac {\ln \left (1+\csc \left (x \right )\right )-\frac {1}{\csc \left (x \right )}-\ln \left (\csc \left (x \right )\right )}{a}\) \(23\)
risch \(\frac {i x}{a}-\frac {i {\mathrm e}^{i x}}{2 a}+\frac {i {\mathrm e}^{-i x}}{2 a}-\frac {2 \ln \left (i+{\mathrm e}^{i x}\right )}{a}\) \(45\)
norman \(\frac {\frac {2 \tan \left (\frac {x}{2}\right )}{a}+\frac {2 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{a}}{\left (\tan ^{2}\left (\frac {x}{2}\right )+1\right ) \left (\tan \left (\frac {x}{2}\right )+1\right )}+\frac {\ln \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )}{a}-\frac {2 \ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{a}\) \(67\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(a+a*csc(x)),x,method=_RETURNVERBOSE)

[Out]

-1/a*(ln(1+csc(x))-1/csc(x)-ln(csc(x)))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 17, normalized size = 1.00 \begin {gather*} -\frac {\log \left (\sin \left (x\right ) + 1\right )}{a} + \frac {\sin \left (x\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+a*csc(x)),x, algorithm="maxima")

[Out]

-log(sin(x) + 1)/a + sin(x)/a

________________________________________________________________________________________

Fricas [A]
time = 3.61, size = 15, normalized size = 0.88 \begin {gather*} -\frac {\log \left (\sin \left (x\right ) + 1\right ) - \sin \left (x\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-(log(sin(x) + 1) - sin(x))/a

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cos {\left (x \right )}}{\csc {\left (x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+a*csc(x)),x)

[Out]

Integral(cos(x)/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 17, normalized size = 1.00 \begin {gather*} -\frac {\log \left (\sin \left (x\right ) + 1\right )}{a} + \frac {\sin \left (x\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+a*csc(x)),x, algorithm="giac")

[Out]

-log(sin(x) + 1)/a + sin(x)/a

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 15, normalized size = 0.88 \begin {gather*} -\frac {\ln \left (\sin \left (x\right )+1\right )-\sin \left (x\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(a + a/sin(x)),x)

[Out]

-(log(sin(x) + 1) - sin(x))/a

________________________________________________________________________________________